#!/usr/bin/python
m_int = 100
m_float = 100.1
m_str = "Jerry"

print m_int
print m_float
print m_str

#batch assignment
a1, a2, a3 = 3, 2, 1
print a1
print a2
print a3

#complex
m_cmp1 = 1 + 2j
m_cmp2 = -2 + 1j
print m_cmp1 + m_cmp2 + 0 + 1j


#stirng
m_str = 'loving mochiko' #len = 14
#[start, end) , exclude m_str[3],
print m_str[0:3] #lov -> m_str[0], m_str[1], m_str[2], exclude m_str[3]
print m_str[-7:] #mochiko
#try to out of range
print m_str[0:100] #loving mochiko
print m_str[-20:-1] #loving mochik
print m_str[0:-8] #loving
print m_str[4:-11] #(empty), cross
print m_str[-20:-15] #(empty), both are out of range
print m_str[100:100] #(empty), both are out of range

#try substr from -1 to 2
print m_str[-1:2] #(empty), can't concat as 'olo'

#weak type
print 'weak type'
print 0 == False #true
print '' == False #false
print '0' == 0 #false
print '0' == False #false

